package bancosys.tec.persist.entities.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import jmine.tec.persist.annotation.Alias;

import org.hibernate.annotations.Filter;
import org.hibernate.annotations.Filters;

import bancosys.tec.persist.authorization.annotation.DisplayName;
import bancosys.tec.persist.bussobj.AuthPersistableBusinessObject;
import bancosys.tec.persist.persister.annotation.Unique;

/**
 * @created 14/12/2007
 * @author Gustavo Almeida
 */
@Entity
@Alias("UVTB")
@Filters({ @Filter(name = "authFilter", condition = "auth = :auth") })
@DisplayName("Bean de teste do validador de unicidade")
public class UniqueValidatorTestBean extends AuthPersistableBusinessObject {
    private Long id;

    private String prop1;

    private String prop2;

    private String prop3;

    /**
     * @return
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return this.id;
    }

    /**
     * Define o id.
     * 
     * @param id O id a ser definido.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return
     */
    @Unique
    @DisplayName("Propriedade 1")
    public String getProp1() {
        return this.prop1;
    }

    /**
     * Define o prop1.
     * 
     * @param prop1 O prop1 a ser definido.
     */
    public void setProp1(String prop1) {
        this.prop1 = prop1;
    }

    /**
     * @return
     */
    @Unique("prop2")
    @DisplayName("Propriedade 2")
    public String getProp2() {
        return this.prop2;
    }

    /**
     * Define o prop2.
     * 
     * @param prop2 O prop2 a ser definido.
     */
    public void setProp2(String prop2) {
        this.prop2 = prop2;
    }

    /**
     * @return
     */
    @Unique("prop2")
    @DisplayName("Propriedade 3")
    public String getProp3() {
        return this.prop3;
    }

    /**
     * Define o prop3.
     * 
     * @param prop3 O prop3 a ser definido.
     */
    public void setProp3(String prop3) {
        this.prop3 = prop3;
    }

}
